home *** CD-ROM | disk | FTP | other *** search
/ Whiteline: Alpha / Whiteline Alpha.iso / progtool / c / gcc / gcc258s.zoo / Makefile.hp < prev    next >
Encoding:
Makefile  |  1994-01-30  |  22.9 KB  |  621 lines

  1. # Makefile for GNU C CROSS compiler for the atariST/TT series hosted
  2. #  on a HPUX host (tested only on a HP Snake running hpux 8.x)
  3. #  NOTE: requires alloca.c from the emacs dist.
  4. #
  5.  
  6. # Makefile for GNU C compiler.
  7. #   Copyright (C) 1987 Free Software Foundation, Inc.
  8.  
  9. #This file is part of GNU CC.
  10.  
  11. #GNU CC is distributed in the hope that it will be useful,
  12. #but WITHOUT ANY WARRANTY.  No author or distributor
  13. #accepts responsibility to anyone for the consequences of using it
  14. #or for whether it serves any particular purpose or works at all,
  15. #unless he says so in writing.  Refer to the GNU CC General Public
  16. #License for full details.
  17.  
  18. #Everyone is granted permission to copy, modify and redistribute
  19. #GNU CC, but only under the conditions described in the
  20. #GNU CC General Public License.   A copy of this license is
  21. #supposed to have been given to you along with GNU CC so you
  22. #can know your rights and responsibilities.  It should be in a
  23. #file named COPYING.  Among other things, the copyright notice
  24. #and this notice must be preserved on all copies.
  25.  
  26. .NOEXPORT: # This tells GNU Make version 3
  27.        # not to put all the variables in the environment.
  28.  
  29. CROSSDIR = /net/acae127/home/bammi/atari.hp-ux/cross-gcc
  30. CROSSBIN = $(CROSSDIR)/bin
  31. CROSSLIB = $(CROSSDIR)/lib
  32. CROSSINC = $(CROSSDIR)/include
  33. GCC_INCLUDE_DIR = $(CROSSINC)
  34. GPLUSPLUS_INCLUDE_DIR = $(CROSSDIR)/g++-inc
  35.  
  36. DFLAGS= -DCROSSDIR=\"$(CROSSDIR)\"
  37. #CFLAGS = $(DFLAGS) -O +Obb1000 -DUSE_C_ALLOCA -DCROSSATARI=1 -DCROSSHPUX -I./config -I. -D_HPUX_SOURCE
  38. CFLAGS = $(DFLAGS) -g -DUSE_C_ALLOCA -DCROSSATARI=1 -DCROSSHPUX -I./config -I. -D_HPUX_SOURCE
  39. LDFLAGS = -g
  40. ALLOCA = /net/acae127/home/bammi/lib.hp-ux/alloca.o
  41. #MALLOC1 = /net/acae127/home/bammi/lib.hp-ux/malloc_new6.o
  42. MALLOC1 = 
  43. # host's cc
  44. CC = /bin/cc -Aa
  45.  
  46. # OLDCC should not be the GNU C compiler.
  47. BISON = bison
  48. BISONFLAGS =
  49. AR = ar
  50. SHELL = /bin/sh
  51.  
  52. bindir = $(CROSSBIN)
  53. libdir = $(CROSSLIB)
  54.  
  55. # These are what you would need on HPUX:
  56. # CFLAGS = -Wc,-Ns2000 -Wc,-Ne700
  57. # -g is desirable in CFLAGS, but a compiler bug in HPUX version 5
  58. # bites whenever tree.def, rtl.def or machmode.def is included
  59. # (ie., on every source file).
  60. # CCLIBFLAGS = -Wc,-Ns2000 -Wc,-Ne700
  61. # For CCLIBFLAGS you might want to specify the switch that
  62. # forces only 68000 instructions to be used.
  63.  
  64. # If you are making gcc for the first time, and if you are compiling it with
  65. # a non-gcc compiler, and if your system doesn't have a working alloca() in any
  66. # of the standard libraries (as is true for HP/UX or Genix),
  67. # then get alloca.c from GNU Emacs and un-comment the following line:
  68. # ALLOCA = alloca.o
  69.  
  70. # If your system has alloca() in /lib/libPW.a, un-comment the following line:
  71. # CLIB= -lPW
  72.   
  73. # If your system's malloc() routine fails for any reason (as it does on
  74. # certain versions of Genix), try getting the files
  75. # malloc.c and getpagesize.h from GNU Emacs and un-comment the following line:
  76. # MALLOC = malloc.o
  77.  
  78. # If you are running GCC on an Apollo, you will need this:
  79. # CFLAGS = -g -O -M 3000 -U__STDC__ -DSHORT_ENUM_BUG
  80.  
  81. # Change this to a null string if obstacks are installed in the
  82. # system library.
  83. OBSTACK=obstack.o
  84.  
  85. # Dependency on obstack, alloca, malloc or whatever library facilities
  86. # are not installed in the system libraries.
  87. LIBDEPS= $(OBSTACK) $(ALLOCA) $(MALLOC)
  88.  
  89. # How to link with both our special library facilities
  90. # and the system's installed libraries.
  91. LIBS = $(OBSTACK) $(ALLOCA) $(MALLOC) $(MALLOC1) $(CLIB)
  92.  
  93. DIR = ../gcc
  94.  
  95. # Object files of CC1.
  96. # Language-specific object files for C.
  97. C_OBJS = c-parse.o c-lang.o c-lex.o c-pragma.o \
  98.    c-decl.o c-typeck.o c-convert.o c-aux-info.o c-common.o c-iterate.o
  99.  
  100. # Language-specific object files for C++.
  101. CPLUS_OBJS = cp-parse.o cp-decl.o cp-decl2.o \
  102.    cp-typeck.o cp-type2.o cp-tree.o cp-ptree.o \
  103.    cp-cvt.o cp-search.o cp-lex.o cp-gc.o cp-call.o \
  104.    cp-class.o cp-init.o cp-method.o cp-except.o \
  105.    cp-expr.o cp-pt.o cp-edsel.o cp-xref.o \
  106.    $(CPLUS_INPUT) cp-spew.o c-common.o cp-error.o cp-errfn.o
  107.  
  108. # Files specific to the C interpreter bytecode compiler(s).
  109. BC_OBJS = bc-emit.o bc-optab.o
  110.  
  111. # Language-independent object files.
  112. OBJS = toplev.o version.o tree.o print-tree.o stor-layout.o fold-const.o \
  113.  function.o stmt.o expr.o calls.o expmed.o explow.o optabs.o varasm.o \
  114.  rtl.o print-rtl.o rtlanal.o emit-rtl.o real.o \
  115.  dbxout.o sdbout.o dwarfout.o xcoffout.o \
  116.  integrate.o jump.o cse.o loop.o unroll.o flow.o stupid.o combine.o \
  117.  regclass.o local-alloc.o global.o reload.o reload1.o caller-save.o \
  118.  insn-peep.o reorg.o sched.o final.o recog.o reg-stack.o \
  119.  insn-opinit.o insn-recog.o insn-extract.o insn-output.o insn-emit.o \
  120.  insn-attrtab.o aux-output.o getpwd.o convert.o $(EXTRA_OBJS)
  121.  
  122. GCC_PASSES=gcc cc1 cpp
  123.  
  124. # Files to be copied away after each stage in building.
  125. STAGESTUFF = *.o insn-flags.h insn-config.h insn-codes.h \
  126.  insn-output.c insn-recog.c insn-emit.c insn-extract.c insn-peep.c \
  127.  insn-attr.h insn-attrtab.c insn-opinit.c \
  128.  stamp-flags stamp-config stamp-codes \
  129.  stamp-output stamp-recog stamp-emit stamp-extract stamp-peep \
  130.  stamp-attr stamp-attrtab stamp-opinit stamp-proto \
  131.  genemit genoutput genrecog genextract genflags gencodes genconfig genpeep \
  132.  genattrtab genattr genopinit \
  133.  bc-arity.h bc-opcode.h bc-opname.h \
  134.  stamp-bcarity stamp-bcopcode stamp-bcopname \
  135.  bi-arity bi-opcode bi-opname \
  136.  $(GCC_PASSES) $(EXTRA_PARTS) $(EXTRA_PROGRAMS) gcc-cross cccp g++ g++-cross \
  137.  cc1plus cc1obj enquire protoize unprotoize specs collect2 $(USE_COLLECT2)
  138.  
  139. # Header files that are made available to programs compiled with gcc.
  140. USER_H = stddef.h stdarg.h assert.h va-*.h limits.h
  141.  
  142. # If you want to recompile everything, just do rm *.o.
  143. # CONFIG_H = config.h tm.h
  144. CONFIG_H =
  145. RTL_H = rtl.h rtl.def machmode.h machmode.def
  146. TREE_H = tree.h real.h tree.def machmode.h machmode.def
  147. CPLUS_TREE_H = $(TREE_H) cp-tree.h cp-tree.def
  148. BYTECODE_H = bytecode.h bc-emit.h bc-optab.h
  149.  
  150. ALL =  gcc cc1 cpp cc1plus
  151.  
  152. all: $(ALL)
  153.  
  154. compilations: ${OBJS}
  155.  
  156. gcc: gcc.o version.o $(LIBDEPS)
  157.     $(CC) $(CFLAGS) $(LDFLAGS) -o gccnew gcc.o version.o $(LIBS)
  158. # Go via `gccnew' to avoid `file busy' if $(CC) is `gcc'.
  159.     mv gccnew gcc
  160.  
  161. gcc.o: gcc.c $(CONFIG_H)
  162.     $(CC) $(CFLAGS) -c -DSTANDARD_EXEC_PREFIX=\"$(libdir)/gcc-\" \
  163. -DDEFAULT_TARGET_MACHINE=\"atariST\" gcc.c
  164.  
  165. cc1: $(C_OBJS) $(OBJS) $(BC_OBJS) $(LIBDEPS)
  166.     $(CC) $(CFLAGS) $(LDFLAGS) -o cc1 $(C_OBJS) $(OBJS) $(BC_OBJS) $(LIBS)
  167.  
  168. cc1plus: $(CPLUS_OBJS) $(OBJS) $(BC_OBJS) $(LIBDEPS)
  169.     $(CC) $(CFLAGS) $(LDFLAGS) -o cc1plus $(CPLUS_OBJS) $(OBJS) $(BC_OBJS) $(LIBS)
  170.  
  171. cc1o: $(OBJC_OBJS) $(OBJS) $(BC_OBJS) $(LIBDEPS)
  172.     $(CC) $(CFLAGS) $(LDFLAGS) -o cc1o $(OBJC_OBJS) $(OBJS) $(BC_OBJS) $(LIBS)
  173.  
  174. # C-language specific files.
  175.  
  176. c-parse.o : c-parse.c $(CONFIG_H) $(TREE_H) c-lex.h c-tree.h input.h flags.h
  177.     $(CC) $(CFLAGS) -c c-parse.c
  178. c-parse.c c-parse.h: c-parse.y
  179.     $(BISON) $(BISONFLAGS) -d c-parse.y -o c-parse.c
  180.  
  181. c-parse.y: c-parse.in 
  182.     sed -e "/^ifobjc$$/,/^end ifobjc$$/d" \
  183.       -e "/^ifc$$/d" -e "/^end ifc$$/d" \
  184.       ./c-parse.in > ./c-parse.y
  185.  
  186. c-decl.o : c-decl.c $(CONFIG_H) $(TREE_H) c-tree.h c-lex.h flags.h
  187. c-typeck.o : c-typeck.c $(CONFIG_H) $(TREE_H) c-tree.h flags.h
  188. c-lang.o : c-lang.c $(CONFIG_H) $(TREE_H)
  189. c-lex.o : c-lex.c $(CONFIG_H) $(TREE_H) c-lex.h c-tree.h c-parse.h \
  190.     input.h flags.h
  191. c-aux-info.o : c-aux-info.c  $(CONFIG_H) $(TREE_H) c-tree.h flags.h
  192. c-convert.o : c-convert.c $(CONFIG_H) $(TREE_H) flags.h
  193. c-iterate.o: c-iterate.c $(CONFIG_H) $(TREE_H) $(RTL_H) c-tree.h flags.h
  194.  
  195. # C++ language specific files.
  196.  
  197. cp-parse.o : cp-parse.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h cp-lex.h
  198.     $(CC) -c $(CFLAGS) cp-parse.c
  199.  
  200. cp-parse.c cp-parse.h : cp-parse.y
  201.     @echo expect 29 shift/reduce conflicts and 14 reduce/reduce conflicts
  202.     $(BISON) $(BISONFLAGS) -d -o cp-parse.c cp-parse.y
  203.     grep '^#define[     ]*YYEMPTY' cp-parse.c >>cp-parse.h
  204.  
  205. cp-spew.o : cp-spew.c $(CONFIG_H) $(CPLUS_TREE_H) \
  206.    cp-parse.h flags.h
  207. cp-lex.o : cp-lex.c $(CONFIG_H) $(CPLUS_TREE_H) \
  208.    cp-parse.h cp-input.c flags.h
  209. cp-decl.o : cp-decl.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h \
  210.   cp-lex.h cp-decl.h stack.h
  211. cp-decl2.o : cp-decl2.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h \
  212.   cp-lex.h cp-decl.h
  213. cp-type2.o : cp-type2.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h
  214. cp-typeck.o : cp-typeck.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h
  215. cp-class.o : cp-class.c $(CONFIG_H) $(CPLUS_TREE_H) stack.h \
  216.     cp-class.h flags.h
  217. cp-call.o : cp-call.c $(CONFIG_H) $(CPLUS_TREE_H) stack.h cp-class.h \
  218.     flags.h
  219. cp-init.o : cp-init.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h
  220. cp-method.o : cp-method.c $(CONFIG_H) $(CPLUS_TREE_H)
  221. cp-cvt.o : cp-cvt.c $(CONFIG_H) $(CPLUS_TREE_H)
  222. cp-search.o : cp-search.c $(CONFIG_H) $(CPLUS_TREE_H) stack.h flags.h
  223. cp-tree.o : cp-tree.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h
  224. cp-ptree.o : cp-ptree.c $(CONFIG_H) $(CPLUS_TREE_H)
  225. cp-gc.o : cp-gc.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h
  226. cp-except.o : cp-except.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h
  227. cp-expr.o : cp-expr.c $(CONFIG_H) $(CPLUS_TREE_H) $(RTL_H) flags.h \
  228.   expr.h insn-codes.h
  229. cp-edsel.o : cp-edsel.c $(CONFIG_H) $(CPLUS_TREE_H) stack.h flags.h
  230. cp-xref.o : cp-xref.c $(CONFIG_H) $(CPLUS_TREE_H)
  231. cp-pt.o : cp-pt.c $(CONFIG_H) $(CPLUS_TREE_H) cp-decl.h cp-parse.h
  232. cp-error.o : cp-error.c $(CONFIG_H) $(CPLUS_TREE_H)
  233. cp-errfn.o : cp-errfn.c $(CONFIG_H) $(CPLUS_TREE_H)
  234.  
  235. # Objectionable C language specific files.
  236.  
  237. objc-parse.o : objc-parse.c $(CONFIG_H) $(TREE_H) c-lex.h \
  238.    c-tree.h input.h flags.h objc-actions.h
  239.     $(CC) $(CFLAGS) -c objc-parse.c
  240. objc-parse.c : objc-parse.y
  241.     $(BISON) $(BISONFLAGS) objc-parse.y -o objc-parse.c
  242.  
  243. objc-actions.o : objc-actions.c $(CONFIG_H) $(TREE_H) c-tree.h c-lex.h \
  244.    flags.h objc-actions.h
  245.  
  246. # A file used by all variants of C.
  247.  
  248. c-common.o : c-common.c $(CONFIG_H) $(TREE_H) c-tree.h c-lex.h flags.h
  249.  
  250.  
  251. # Language-independent files.
  252. dumpvers: dumpvers.c
  253.  
  254. version.o: version.c
  255. obstack.o: obstack.c
  256.  
  257. tree.o : tree.c $(CONFIG_H) $(TREE_H) gvarargs.h flags.h function.h
  258. print-tree.o : print-tree.c $(CONFIG_H) $(TREE_H)
  259. stor-layout.o : stor-layout.c $(CONFIG_H) $(TREE_H) function.h
  260. fold-const.o : fold-const.c $(CONFIG_H) $(TREE_H) flags.h 
  261. toplev.o : toplev.c $(CONFIG_H) $(TREE_H) $(RTL_H) flags.h input.h \
  262.  insn-attr.h xcoffout.h
  263.  
  264. rtl.o : rtl.c $(CONFIG_H) $(RTL_H)
  265.  
  266. print-rtl.o : print-rtl.c $(CONFIG_H) $(RTL_H)
  267. rtlanal.o : rtlanal.c $(CONFIG_H) $(RTL_H)
  268.  
  269. toplev.o: bytecode.h bc-emit.h
  270. varasm.o : varasm.c $(CONFIG_H) $(TREE_H) $(RTL_H) flags.h \
  271.    defaults.h insn-codes.h expr.h hard-reg-set.h regs.h xcoffout.h bytecode.h
  272. function.o : function.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h function.h  \
  273.    insn-flags.h insn-codes.h expr.h regs.h hard-reg-set.h insn-config.h \
  274.    recog.h output.h bytecode.h
  275. stmt.o : stmt.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h function.h  \
  276.    insn-flags.h insn-config.h insn-codes.h hard-reg-set.h expr.h loop.h \
  277.    recog.h bytecode.h bc-typecd.h bc-typecd.def bc-opcode.h bc-optab.h \
  278.    bc-emit.h
  279. expr.o : expr.c $(CONFIG_H) $(RTL_H) $(TREE_H) gvarargs.h flags.h function.h  \
  280.    insn-flags.h insn-codes.h expr.h insn-config.h recog.h output.h \
  281.    typeclass.h bytecode.h bc-opcode.h bc-typecd.h bc-typecd.def bc-optab.h \
  282.    bc-emit.h modemap.def
  283. calls.o : calls.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h expr.h insn-codes.h \
  284.    insn-flags.h
  285. expmed.o : expmed.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h  \
  286.    insn-flags.h insn-config.h insn-codes.h expr.h recog.h real.h
  287. explow.o : explow.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h hard-reg-set.h \
  288.    insn-config.h expr.h recog.h insn-flags.h insn-codes.h
  289. optabs.o : optabs.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h  \
  290.    insn-flags.h insn-config.h insn-codes.h expr.h recog.h
  291. dbxout.o : dbxout.c $(CONFIG_H) $(TREE_H) $(RTL_H) flags.h regs.h \
  292.    insn-config.h reload.h gstab.h xcoffout.h
  293. sdbout.o : sdbout.c $(CONFIG_H) $(TREE_H) $(RTL_H) gsyms.h flags.h \
  294.    insn-config.h reload.h
  295. dwarfout.o : dwarfout.c $(CONFIG_H) $(TREE_H) $(RTL_H) dwarf.h flags.h \
  296.    insn-config.h reload.h output.h
  297. xcoffout.o : xcoffout.c $(CONFIG_H) $(TREE_H) $(RTL_H) xcoffout.h flags.h
  298. emit-rtl.o : emit-rtl.c $(CONFIG_H) $(RTL_H) flags.h gvarargs.h function.h  \
  299.    regs.h insn-config.h insn-codes.h real.h expr.h bytecode.h bc-opcode.h \
  300.    bc-typecd.h bc-typecd.def bc-optab.h bc-emit.h bc-opname.h
  301. real.o : real.c $(CONFIG_H) $(TREE_H)
  302. getpwd.o : getpwd.c $(CONFIG_H)
  303.  
  304. integrate.o : integrate.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h integrate.h \
  305.    insn-flags.h insn-config.h insn-codes.h expr.h real.h function.h \
  306.    bytecode.h
  307.  
  308. jump.o : jump.c $(CONFIG_H) $(RTL_H) flags.h hard-reg-set.h regs.h \
  309.    insn-config.h insn-flags.h insn-codes.h expr.h real.h
  310. stupid.o : stupid.c $(CONFIG_H) $(RTL_H) regs.h hard-reg-set.h flags.h
  311.  
  312. cse.o : cse.c $(CONFIG_H) $(RTL_H) regs.h hard-reg-set.h flags.h real.h \
  313.    insn-config.h recog.h
  314. loop.o : loop.c $(CONFIG_H) $(RTL_H) flags.h loop.h insn-config.h \
  315.    insn-flags.h insn-codes.h regs.h hard-reg-set.h recog.h expr.h real.h
  316. unroll.o : unroll.c $(CONFIG_H) $(RTL_H) insn-config.h insn-codes.h \
  317.    integrate.h regs.h flags.h expr.h loop.h
  318. flow.o : flow.c $(CONFIG_H) $(RTL_H) flags.h insn-config.h \
  319.    basic-block.h regs.h hard-reg-set.h output.h
  320. combine.o : combine.c $(CONFIG_H) $(RTL_H) gvarargs.h flags.h  \
  321.    insn-config.h insn-flags.h insn-codes.h insn-attr.h regs.h expr.h \
  322.    basic-block.h recog.h real.h
  323. regclass.o : regclass.c $(CONFIG_H) $(RTL_H) hard-reg-set.h flags.h \
  324.    basic-block.h regs.h insn-config.h recog.h reload.h real.h bytecode.h
  325. local-alloc.o : local-alloc.c $(CONFIG_H) $(RTL_H) flags.h basic-block.h \
  326.    regs.h hard-reg-set.h insn-config.h recog.h output.h
  327. global.o : global.c $(CONFIG_H) $(RTL_H) flags.h  \
  328.    basic-block.h regs.h hard-reg-set.h insn-config.h output.h
  329.  
  330. reload.o : reload.c $(CONFIG_H) $(RTL_H) flags.h \
  331.    reload.h recog.h hard-reg-set.h insn-config.h insn-codes.h regs.h real.h
  332. reload1.o : reload1.c $(CONFIG_H) $(RTL_H) flags.h expr.h \
  333.    reload.h regs.h hard-reg-set.h insn-config.h insn-flags.h insn-codes.h \
  334.    basic-block.h recog.h output.h
  335. caller-save.o : caller-save.c $(CONFIG_H) $(RTL_H) flags.h \
  336.    regs.h hard-reg-set.h insn-config.h basic-block.h recog.h reload.h expr.h
  337. reorg.o : reorg.c $(CONFIG_H) $(RTL_H) conditions.h hard-reg-set.h \
  338.    basic-block.h regs.h insn-config.h insn-attr.h insn-flags.h recog.h \
  339.    flags.h output.h
  340. sched.o : sched.c $(CONFIG_H) $(RTL_H) basic-block.h regs.h hard-reg-set.h \
  341.    flags.h insn-config.h insn-attr.h
  342. final.o : final.c $(CONFIG_H) $(RTL_H) $(TREE_H) gvarargs.h flags.h regs.h \
  343.    recog.h conditions.h insn-config.h insn-attr.h real.h output.h \
  344.    hard-reg-set.h insn-codes.h gstab.h xcoffout.h
  345. recog.o : recog.c $(CONFIG_H) $(RTL_H)  \
  346.    regs.h recog.h hard-reg-set.h flags.h insn-config.h insn-attr.h \
  347.    insn-flags.h insn-codes.h real.h
  348. reg-stack.o : reg-stack.c $(CONFIG_H) $(RTL_H) $(TREE_H) \
  349.    regs.h hard-reg-set.h flags.h insn-config.h
  350.    
  351. aux-output.o : aux-output.c $(CONFIG_H) \
  352.    $(RTL_H) regs.h hard-reg-set.h real.h insn-config.h conditions.h \
  353.    insn-flags.h output.h insn-attr.h insn-codes.h
  354.  
  355. .PRECIOUS: insn-config.h insn-flags.h insn-codes.h \
  356.   insn-emit.c insn-recog.c insn-extract.c insn-output.c insn-peep.c \
  357.   insn-attr.h insn-attrtab.c
  358.  
  359. insn-config.h : md genconfig
  360.     ./genconfig md > tmp-insn-config.h
  361.     ./move-if-change tmp-insn-config.h insn-config.h
  362.  
  363. insn-flags.h : md genflags
  364.     ./genflags md > tmp-insn-flags.h
  365.     ./move-if-change tmp-insn-flags.h insn-flags.h
  366.  
  367. insn-codes.h : md gencodes
  368.     ./gencodes md > tmp-insn-codes.h
  369.     ./move-if-change tmp-insn-codes.h insn-codes.h
  370.  
  371. insn-emit.o : insn-emit.c $(CONFIG_H) $(RTL_H) expr.h insn-config.h
  372.     $(CC) $(CFLAGS) -c insn-emit.c
  373.  
  374. insn-emit.c : md genemit
  375.     ./genemit md > tmp-insn-emit.c
  376.     ./move-if-change tmp-insn-emit.c insn-emit.c
  377.  
  378. insn-recog.o : insn-recog.c $(CONFIG_H) $(RTL_H) insn-config.h
  379.     $(CC) $(CFLAGS) -c insn-recog.c
  380.  
  381. insn-recog.c : md genrecog
  382.     ./genrecog md > tmp-insn-recog.c
  383.     ./move-if-change tmp-insn-recog.c insn-recog.c
  384.  
  385. insn-opinit.o : insn-opinit.c $(CONFIG_H) $(RTL_H) insn-codes.h insn-flags.h \
  386.   insn-config.h flags.h rtl.h recog.h expr.h reload.h
  387.     $(CC) $(CFLAGS) -c insn-opinit.c
  388.  
  389. insn-opinit.c: md genopinit
  390.     ./genopinit md > tmp-opinit.c
  391.     ./move-if-change tmp-opinit.c insn-opinit.c
  392.  
  393. insn-extract.o : insn-extract.c $(RTL_H)
  394.     $(CC) $(CFLAGS) -c insn-extract.c
  395.  
  396. insn-extract.c : md genextract
  397.     ./genextract md > tmp-insn-extract.c
  398.     ./move-if-change tmp-insn-extract.c insn-extract.c
  399.  
  400. insn-peep.o : insn-peep.c $(CONFIG_H) $(RTL_H) regs.h
  401.     $(CC) $(CFLAGS) -c insn-peep.c
  402.  
  403. insn-peep.c : md genpeep
  404.     ./genpeep md > tmp-insn-peep.c
  405.     ./move-if-change tmp-insn-peep.c insn-peep.c
  406.  
  407. insn-output.o : insn-output.c $(CONFIG_H) $(RTL_H) regs.h insn-config.h insn-flags.h conditions.h output.h aux-output.c
  408.     $(CC) $(CFLAGS) -c insn-output.c
  409.  
  410. insn-output.c : md genoutput
  411.     ./genoutput md > tmp-insn-output.c
  412.     ./move-if-change tmp-insn-output.c insn-output.c
  413.  
  414. insn-attrtab.o : insn-attrtab.c $(CONFIG_H) $(RTL_H) regs.h real.h output.h \
  415.      insn-attr.h insn-config.h
  416.     $(CC) $(CFLAGS) -c insn-attrtab.c
  417.  
  418. insn-attr.h: md genattr
  419.     ./genattr md > tmp-attr.h
  420.     ./move-if-change tmp-attr.h insn-attr.h
  421.  
  422. insn-attrtab.c: md genattrtab
  423.     ./genattrtab md > tmp-attrtab.c
  424.     ./move-if-change tmp-attrtab.c insn-attrtab.c
  425.  
  426. # Now the programs that generate those files.
  427.  
  428. genconfig : genconfig.o rtl.o $(LIBDEPS)
  429.     $(CC) $(CFLAGS) $(LDFLAGS) -o genconfig genconfig.o rtl.o $(LIBS)
  430.  
  431. genconfig.o : genconfig.c $(RTL_H)
  432.     $(CC) $(CFLAGS) -c genconfig.c
  433.  
  434. genflags : genflags.o rtl.o $(LIBDEPS)
  435.     $(CC) $(CFLAGS) $(LDFLAGS) -o genflags genflags.o rtl.o $(LIBS)
  436.  
  437. genflags.o : genflags.c $(RTL_H)
  438.     $(CC) $(CFLAGS) -c genflags.c
  439.  
  440. gencodes : gencodes.o rtl.o $(LIBDEPS)
  441.     $(CC) $(CFLAGS) $(LDFLAGS) -o gencodes gencodes.o rtl.o $(LIBS)
  442.  
  443. gencodes.o : gencodes.c $(RTL_H)
  444.     $(CC) $(CFLAGS) -c gencodes.c
  445.  
  446. genemit : genemit.o rtl.o $(LIBDEPS)
  447.     $(CC) $(CFLAGS) $(LDFLAGS) -o genemit genemit.o rtl.o $(LIBS)
  448.  
  449. genemit.o : genemit.c $(RTL_H)
  450.     $(CC) $(CFLAGS) -c genemit.c
  451.  
  452. genopinit : genopinit.o rtl.o $(LIBDEPS)
  453.     $(CC) $(CFLAGS) $(LDFLAGS) -o genopinit genopinit.o rtl.o $(LIBS)
  454.  
  455. genopinit.o : genopinit.c $(RTL_H)
  456.     $(CC) $(CFLAGS) -c genopinit.c
  457.  
  458. genrecog : genrecog.o rtl.o $(LIBDEPS)
  459.     $(CC) $(CFLAGS) $(LDFLAGS) -o genrecog genrecog.o rtl.o $(LIBS)
  460.  
  461. genrecog.o : genrecog.c $(RTL_H)
  462.     $(CC) $(CFLAGS) -c genrecog.c
  463.  
  464. genextract : genextract.o rtl.o $(LIBDEPS)
  465.     $(CC) $(CFLAGS) $(LDFLAGS) -o genextract genextract.o rtl.o $(LIBS)
  466.  
  467. genextract.o : genextract.c $(RTL_H)
  468.     $(CC) $(CFLAGS) -c genextract.c
  469.  
  470. genpeep : genpeep.o rtl.o $(LIBDEPS)
  471.     $(CC) $(CFLAGS) $(LDFLAGS) -o genpeep genpeep.o rtl.o $(LIBS)
  472.  
  473. genpeep.o : genpeep.c $(RTL_H)
  474.     $(CC) $(CFLAGS) -c genpeep.c
  475.  
  476. genoutput : genoutput.o rtl.o $(LIBDEPS)
  477.     $(CC) $(CFLAGS) $(LDFLAGS) -o genoutput genoutput.o rtl.o $(LIBS)
  478.  
  479. genoutput.o : genoutput.c $(RTL_H)
  480.     $(CC) $(CFLAGS) -c genoutput.c
  481.  
  482. genattr : genattr.o rtl.o $(LIBDEPS)
  483.     $(CC) $(CFLAGS) $(LDFLAGS) -o genattr \
  484.      genattr.o rtl.o $(LIBS)
  485.  
  486. genattr.o : genattr.c $(RTL_H) config.h
  487.     $(CC) -c $(CFLAGS) genattr.c
  488.  
  489. genattrtab : genattrtab.o rtl.o rtlanal.o $(LIBDEPS)
  490.     $(CC) $(CFLAGS) $(LDFLAGS) -o genattrtab \
  491.      genattrtab.o rtl.o rtlanal.o $(LIBS)
  492.  
  493. genattrtab.o : genattrtab.c $(RTL_H) config.h insn-config.h
  494.     $(CC) -c $(CFLAGS) genattrtab.c
  495.  
  496. # Remake bytecode files.
  497. # BI_ALL=bi-run.o
  498. BI_ALL=
  499. BC_ALL=bc-opname.h bc-opcode.h bc-arity.h
  500. BI_OBJ=bi-parser.o bi-lexer.o bi-reverse.o
  501.  
  502.  
  503. bc-emit.o : bc-emit.c $(CONFIG_H) $(RTL_H) real.h $(BYTECODE_H) \
  504.      bc-arity.h bc-opcode.h bc-typecd.h bc-typecd.def bi-run.h bytetypes.h
  505. bc-optab.o : bc-optab.c $(CONFIG_H) $(REAL_H) $(BYTECODE_H) \
  506.         bc-opcode.h bc-typecd.h bc-typecd.def
  507.  
  508. bi-run.o:    $(srcdir)/bi-run.c $(srcdir)/bi-run.h $(srcdir)/bc-typecd.h \
  509.   bc-opname.h bc-arity.h bc-opcode.h
  510.     $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c $(srcdir)/bi-run.c
  511.  
  512. HOST_CC = $(CC)
  513. HOST_CFLAGS = $(CFLAGS)
  514. HOST_LDFLAGS = $(LDFLAGS)
  515. HOST_LIBDEPS = $(LIBDEPS)
  516. HOST_LIBS = $(LIBS)
  517. srcdir = .
  518.  
  519. bytecode: $(BI_ALL) $(BC_ALL)
  520.  
  521. bi-arity: bi-arity.o $(BI_OBJ) $(HOST_LIBDEPS)
  522.     $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o bi-arity \
  523.      bi-arity.o $(BI_OBJ) $(HOST_LIBS)
  524. bi-opcode: bi-opcode.o $(BI_OBJ) $(HOST_LIBDEPS)
  525.     $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o bi-opcode \
  526.      bi-opcode.o $(BI_OBJ) $(HOST_LIBS)
  527. bi-opname: bi-opname.o $(BI_OBJ) $(HOST_LIBDEPS)
  528.     $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o bi-opname \
  529.      bi-opname.o $(BI_OBJ) $(HOST_LIBS)
  530.  
  531. $(srcdir)/bi-parser.c $(srcdir)/bi-parser.h: $(srcdir)/bi-parser.y
  532.     cd $(srcdir); $(BISON) $(BISONFLAGS) -d bi-parser.y -o bi-parser.c
  533. bi-parser.o:    $(srcdir)/bi-parser.c $(srcdir)/bi-defs.h hconfig.h
  534.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \
  535.        $(srcdir)/bi-parser.c
  536. bi-lexer.o:    $(srcdir)/bi-lexer.c $(srcdir)/bi-parser.h hconfig.h
  537.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \
  538.        $(srcdir)/bi-lexer.c
  539. bi-arity.o: bi-arity.c $(srcdir)/bi-defs.h hconfig.h
  540.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \
  541.        $(srcdir)/bi-arity.c
  542. bi-opcode.o: bi-opcode.c $(srcdir)/bi-defs.h hconfig.h
  543.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \
  544.        $(srcdir)/bi-opcode.c
  545. bi-opname.o: bi-opname.c $(srcdir)/bi-defs.h hconfig.h
  546.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \
  547.        $(srcdir)/bi-opname.c
  548. bi-reverse.o: bi-reverse.c $(srcdir)/bi-defs.h
  549.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \
  550.        $(srcdir)/bi-reverse.c
  551.  
  552.  
  553. bc-arity.h: stamp-bcarity ; @true
  554. stamp-bcarity : $(srcdir)/bytecode.def bi-arity $(srcdir)/move-if-change
  555.     ./bi-arity < $(srcdir)/bytecode.def >tmp-bc-arity.h
  556.     $(srcdir)/move-if-change tmp-bc-arity.h bc-arity.h
  557.     touch stamp-bcarity
  558.  
  559. bc-opcode.h: stamp-bcopcode ; @true
  560. stamp-bcopcode : $(srcdir)/bytecode.def bi-opcode $(srcdir)/move-if-change
  561.     ./bi-opcode < $(srcdir)/bytecode.def >tmp-bcopcd.h
  562.     $(srcdir)/move-if-change tmp-bcopcd.h bc-opcode.h
  563.     touch stamp-bcopcode
  564.  
  565. bc-opname.h: stamp-bcopname ; @true
  566. stamp-bcopname : $(srcdir)/bytecode.def bi-opname $(srcdir)/move-if-change
  567.     ./bi-opname < $(srcdir)/bytecode.def >tmp-bcopnm.h
  568.     $(srcdir)/move-if-change tmp-bcopnm.h bc-opname.h
  569.     touch stamp-bcopname
  570.  
  571. bytecode.mostlyclean:
  572.     -rm -f bc-arity.h bc-opcode.h bc-opname.h
  573.  
  574. bytecode.distclean bytecode.clean:    bytecode.mostlyclean
  575.     -rm -f bi-arity bi-opcode bi-opname bi-lexer
  576.  
  577. bytecode.realclean: bytecode.clean
  578.     -rm -f bi-parser.c bi-parser.h
  579.  
  580.  
  581.  
  582. # Making the preprocessor
  583. cpp: cccp
  584.     -rm -f cpp
  585.     ln cccp cpp
  586. cccp: cccp.o cexp.o version.o $(LIBDEPS)
  587.     $(CC) $(CFLAGS) $(LDFLAGS) -o cccp cccp.o cexp.o version.o $(LIBS)
  588. cexp.o: cexp.c
  589. cexp.c: cexp.y
  590.     $(BISON) -o cexp.c cexp.y
  591. cccp.o: cccp.c pcp.h $(CONFIG_H)
  592.     $(CC) $(CFLAGS) -DGCC_INCLUDE_DIR=\"$(GCC_INCLUDE_DIR)\" \
  593.           -DGPLUSPLUS_INCLUDE_DIR=\"$(GPLUSPLUS_INCLUDE_DIR)\" \
  594.       -DCROSSINC=\"$(CROSSINC)\" -c cccp.c
  595.  
  596. # gnulib is not deleted because deleting it would be inconvenient
  597. # for most uses of this target.
  598. clean: bytecode.clean
  599.     -rm -f *.o *.oo $(STAGESTUFF)
  600.     -rm -f *.s *.s[0-9] *.co *.greg *.lreg *.combine *.flow *.cse *.jump *.rtl *.tree *.loop
  601.     -rm -f core
  602.  
  603. # Get rid of every file that's generated from some other file (except INSTALL).
  604. realclean: clean bytecode.realclean
  605.     -rm -f $(ALL)
  606.     -rm -f cpp.aux cpp.cps cpp.fns cpp.info cpp.kys cpp.pgs cpp.tps cpp.vrs
  607.     -rm -f errs gnulib TAGS 
  608.     -rm -f core report
  609.     -rm -f internals internals-* internals.?? internals.??s
  610.  
  611. # Copy the files into directories where they will be run.
  612. install: all
  613.     cp cc1 $(libdir)/gcc-cc1
  614.     cp cpp $(libdir)/gcc-cpp
  615.     cp gcc $(bindir)/cgcc
  616.     cp cc1plus $(libdir)/gcc-cc1plus
  617.  
  618. force:
  619. #In GNU Make, ignore whether `stage*' exists.
  620. .PHONY: clean realclean
  621.